{
 "cells": [
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2025-09-15T07:58:59.461790Z",
     "start_time": "2025-09-15T07:58:59.457403Z"
    }
   },
   "source": [
    "# import yaml\n",
    "# class Monster(yaml.YAMLObject):\n",
    "#   yaml_tag = u'!Monster'\n",
    "#   def __init__(self, name, hp, ac, attacks):\n",
    "#     self.name = name\n",
    "#     self.hp = hp\n",
    "#     self.ac = ac\n",
    "#     self.attacks = attacks\n",
    "#   def __repr__(self):\n",
    "#     return \"%s(name=%r, hp=%r, ac=%r, attacks=%r)\" % (\n",
    "#        self.__class__.__name__, self.name, self.hp, self.ac,\n",
    "#        self.attacks)\n",
    "#\n",
    "# yaml.load(\"\"\"\n",
    "# --- !Monster\n",
    "# name: Cave spider\n",
    "# hp: [2,6]    # 2d6\n",
    "# ac: 16\n",
    "# attacks: [BITE, HURT]\n",
    "# \"\"\")\n",
    "#\n",
    "# Monster(name='Cave spider', hp=[2, 6], ac=16, attacks=['BITE', 'HURT'])\n",
    "#\n",
    "# print yaml.dump(Monster(\n",
    "#     name='Cave lizard', hp=[3,6], ac=16, attacks=['BITE','HURT']))\n",
    "class MyClass:\n",
    "  pass\n",
    "\n",
    "instance = MyClass()\n",
    "\n",
    "type(instance)\n",
    "# type(MyClass)"
   ],
   "outputs": [
    {
     "data": {
      "text/plain": [
       "__main__.MyClass"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 7
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
